package com.pxst.bank.controller;

import com.pxst.bank.resp.BankCardResp;
import com.pxst.bank.service.SysAvailableBankService;
import com.pxst.resp.ApiResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* @author zarke
* @since 2023-09-26 11:10:14
 * @description 银行账户管理-银行卡相关接口
*/
@RestController
@RequestMapping("/api/bankCard")
@Api(tags = "银行卡相关接口")
public class SysBankCardController {

    @Autowired
    private SysAvailableBankService sysAvailableBankService;

    @GetMapping("/simple")
    @ApiOperation(value = "银行卡下拉框信息")
    public ApiResp<BankCardResp> getBankList(@RequestParam("with") String with ) {
        return sysAvailableBankService.getInfo();
    }

    @GetMapping("/{id}")
    @ApiOperation(value = "银行卡详情")
    public ApiResp<BankCardResp> getBank(@PathVariable Long id) {
        return sysAvailableBankService.getBank(id);
    }
}
